<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../../css/main.css">
<script src="../../libs/jquery.min.js"></script>
<script src="../../plugins/layer/layer.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../libs/vue.min.js"></script>
<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
<script src="../../js/common.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
	<div class="container">
		<div class="row clearfix">
			<div class="col-md-4 column">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							发布与浏览积分设置
						</h3>
					</div>
					<div class="panel-body">
						<div v-show="showReleaseIntegral">
							<label>发布积分为:</label><label>{{ integralConfiguration.releaseintegral }}</label>
							<a class="btn btn-primary" @click="showReleaseIntegral = false;integralSetting.releaseintegral = integralConfiguration.releaseintegral"><i class="fa fa-cog"></i>&nbsp;设置</a>
						</div>
						<div v-show="!showReleaseIntegral">
							<label>发布积分:</label><input type="number" style="width: 80px;display: inline" class="form-control"  min="0" v-model="integralSetting.releaseintegral">
							<button class="btn btn-primary" style="display: inline" @click="updateIntegral('ReleaseIntegral')">确定</button>
							<button class="btn btn-warning" style="display: inline" @click="showReleaseIntegral = true">取消</button>
						</div>
						<br>
						<div v-show="showBrowseIntegral">
							<label>浏览积分为:</label><label>{{ integralConfiguration.browseintegral }}</label>
							<a class="btn btn-primary" @click="showBrowseIntegral = false;integralSetting.browseintegral = integralConfiguration.browseintegral"><i class="fa fa-cog"></i>&nbsp;设置</a>
						</div>
						<div v-show="!showBrowseIntegral">
							<label>浏览积分:</label>
							<input type="number" style="width: 80px;display: inline" class="form-control"  min="0" v-model="integralSetting.browseintegral">
							<button class="btn btn-primary" style="display: inline" @click="updateIntegral('BrowseIntegral')">确定</button>
							<button class="btn btn-warning" style="display: inline" @click="showBrowseIntegral = true">取消</button>
						</div>
					</div>
				</div>
			</div>
			<div class="col-md-4 column">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							初始积分设置
						</h3>
					</div>
					<div class="panel-body">
						<div v-show="showIntegralNumber">
							<label>注册新用户增送积分为:</label><label>{{ integralConfiguration.integralnumber }}</label>
							<a class="btn btn-primary" @click="showIntegralNumber = false;integralSetting.integralnumber = integralConfiguration.integralnumber"><i class="fa fa-cog"></i>&nbsp;设置</a>
						</div>
						<div v-show="!showIntegralNumber">
							<label>增送积分:</label>
							<input type="number" style="width: 80px;display: inline" class="form-control"  min="0" v-model="integralSetting.integralnumber">
							<button class="btn btn-primary" style="display: inline" @click="updateInitIntegral">确定</button>
							<button class="btn btn-warning" style="display: inline" @click="showIntegralNumber = true">取消</button>
						</div>
						<br><br><br>
					</div>
				</div>
			</div>
			<div class="col-md-4 column">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							积分优惠设置(浏览与发布优惠)
						</h3>
					</div>
					<div class="panel-body">
						<div v-show="showVipDiscount">
							<label>vip优惠(10:无优惠,0:免费):</label><label>{{ integralConfiguration.vipdiscount }}折</label>
							<a class="btn btn-primary" @click="showVipDiscount = false;integralSetting.vipdiscount = integralConfiguration.vipdiscount"><i class="fa fa-cog"></i>&nbsp;设置</a>
						</div>
						<div v-show="!showVipDiscount">
							<label>vip优惠(10:无优惠,0:免费):</label>
							<input type="number" style="width: 80px;display: inline" class="form-control"  min="0" max="10" v-model="integralSetting.vipdiscount">
							<button class="btn btn-primary" style="display: inline" @click="updateDiscounts('VIPDiscount')">确定</button>
							<button class="btn btn-warning" style="display: inline" @click="showVipDiscount = true">取消</button>
						</div>
						<br><br>
						<div v-show="showDiscount">
							<label>用户优惠(10:无优惠,0:免费):</label><label>{{ integralConfiguration.discount }}折</label>
							<a class="btn btn-primary" @click="showDiscount = false;integralSetting.discount = integralConfiguration.discount"><i class="fa fa-cog"></i>&nbsp;设置</a>
						</div>
						<div v-show="!showDiscount">
							<label>用户优惠(10:无优惠,0:免费):</label>
							<input type="number" style="width: 80px;display: inline" class="form-control"  min="0" max="10" v-model="integralSetting.discount">
							<button class="btn btn-primary" style="display: inline" @click="updateDiscounts('Discount')">确定</button>
							<button class="btn btn-warning" style="display: inline" @click="showDiscount = true">取消</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">
				支付积分列表
			</h3>
		</div>
		<div class="panel-body">
			<div class="grid-btn" v-show="showList">
				<a v-if="hasPermission('pointmanagement:pointmanagement:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
				<a v-if="hasPermission('pointmanagement:pointmanagement:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
				<a v-if="hasPermission('pointmanagement:pointmanagement:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</div>
			<table id="jqGrid"></table>
			<div id="jqGridPager"></div>
		</div>
	</div>
</div>

<script src="../../js/modules/pointmanagement/pointmanagement.js"></script>
</body>
</html>